package com.zhang.crm.controller;


import com.zhang.crm.pojo.TDicValue;
import com.zhang.crm.result.R;
import com.zhang.crm.service.DicService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DicController {

    @Resource
    private DicService dicService;

    @GetMapping("api/loadDicSelect")
    public R loadAppellationSelect(@RequestParam("select") String type) {
        List<TDicValue> dicValueList = dicService.loadDicValue(type);
        return R.OK(dicValueList);
    }

    @GetMapping("api/loadTranStageDic")
    public R loadTranStageDic() {
        List<TDicValue> dicValueList = dicService.loadTranStage();
        return R.OK(dicValueList);
    }
}
